package com.jgp.common.exception;

/**
 * 项目   jgp-cloud-parent
 * 作者   loufei
 * 时间   2018/12/22
 */
public abstract class JGPException extends Exception{
    
    private String module;
    private String code;
    
    public JGPException(String module, ErrorCode code) {
        super(code.getMsg());
        this.module = module;
        this.code = code.getCode();
    }
    
    public JGPException(String module, ErrorCode code, Exception e) {
        super(code.getMsg(),e);
        this.module = module;
        this.code = code.getCode();
    }
    
    public String getModule() {
        return module;
    }
    
    public void setModule(String module) {
        this.module = module;
    }
    
    public String getCode() {
        return code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }

}
